{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": true,
    "pycharm": {
     "name": "#%% md\n"
    }
   },
   "source": [
    "## 索引\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "source": [
    "首先还是关注一下`.loc[]`和`.iloc[]`，参考了文章[Pandas中loc和iloc函数用法详解](https://zhuanlan.zhihu.com/p/59307125)，\n",
    "我发现我纠结的地方在于这两个方法如果进行**行定位**的。其实还是很好理解，`loc[]`通过且仅仅能通过行index来定位行，所以如果没有index或对当前index不满意\n",
    "需要通过`set_index()`来设置index。而`iloc[]`（i表示是integer的意思）就是直接用第几行来定位，第0行全部列就是`df.iloc[0,:]`，而不是通过自己设置的index来定位，\n",
    "而是通过默认的行编号来定位。"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%% md\n"
    }
   }
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}